A5.ControlBarItem Button Toggle Object
Description
Definition of a toggle button.
Properties
- typestring
The type of item. For a toggle button item the value must be "button-toggle".
- sizestring
The size of the item.
- autoHideDisclosurestring
Whether or not to hide the disclosure when the toggle button is clicked. The default is "auto" which will close the disclosure if the A5.ControlBar.showDisclosure methods settings autoHide property is set to true, but leave it open if it is false. A value of "always" will always hide the disclosure. A value of "never" will never hide the disclosure.
- actionsobject
Bindings of events to named actions. The property names are those of events that occur on the item. Values are "click", "down", "up", "downhold", "contextclick", "dblclick" and "swipe". The value of these properties is then name of the action to fire when the event occurs. If an action named "back" should fire then the user clicks the item, the JSON would be "{click: 'back'}".
- settingsobject
The settings for the toggle button.
- themestring
The theme to use for the toggle button.
- typestring
The type of toggle button. The default is "two-state", "multi-state" can be used for a multiple state button.
- keepPressedboolean
Whether or not to keep a two-state button pressed when the value of it is true.
- layoutstring
The layout of the toggle button. Values are "text", "icon", "text icon", "icon text", "text/icon", "icon/text", "text-icon" and "icon-text".
- stylestring
The inline CSS to put on the toggle button.
- classNamestring
The class name to put on the toggle button.
- hoverClassNamestring
The class name to put on the toggle button when the user hovers over it.
- pressedClassNamestring
The class name to put on the toggle button when the user presses it.
- disabledClassNamestring
The class name to put on the toggle button when it is disabled.
- iconStylestring
The inline CSS to put on the icon in the toggle button.
- iconClassNamestring
The class name to put on the icon in the toggle button.
- htmlstring
The HTML to use in the toggle button. Can contain template syntax that references control bar data. If there is a value in the data named "customer", it can be accessed by putting "{customer}" into the HTML.
- iconstring
The icon to use in the toggle button.
- hoverIconstring
The icon to use in the toggle button when the user hovers over it.
- pressedIconstring
The icon to use in the toggle button when the user presses it.
- disabledIconstring
The icon to use in the toggle button when it is disabled.
- bindobject
Bindings for the item.
- valuestring
The path to the property in the data that the value for the toggle button is stored. When the toggle button is two-state, the value will be a boolean, for multi-state it will be a number index into the data array.
- datastring
The path to the property in the data in which the button definitions for a multi-state button are stored. The property must be an array of objects with each object containing the settings to display in the button (html, icon, hoverIcon, etc.).
- showstring
The show expression for the item.
- disabledstring
The disabled expression for the item.